]> dgit.raspbian.org Git - dovecot.git/commit
[PATCH 1/2] lib: Add str_equals_timing_safe()
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 27 Apr 2026 22:50:56 +0000 (01:50 +0300)
committerNoah Meyerhans <noahm@debian.org>
Wed, 16 Sep 2026 19:06:35 +0000 (15:06 -0400)
commitdd8d1955150cc3c9810aab35e8074d3bf5ce6c12
treeaeb9c57aef69d0a40007ebd8559b616f2560c61e
parenta768fa183f136ac8dd32e201736440f089f2ec8a
[PATCH 1/2] lib: Add str_equals_timing_safe()

Constant-time string comparison that avoids the length leak in
str_equals_timing_almost_safe(). Compares HMAC-SHA256 digests of the
inputs (keyed with hash_iv) rather than the strings themselves, so
neither the contents nor the length of either input affects timing in
a way an attacker can exploit.

Gbp-Pq: Name 0001-lib-Add-str_equals_timing_safe.patch
src/lib/strfuncs.c
src/lib/strfuncs.h
src/lib/test-strfuncs.c